/*--------------------------------------------------------------------------------*/
#ifndef __GRAPHIC_TEXT_FPS__
#define __GRAPHIC_TEXT_FPS__
/*--------------------------------------------------------------------------------*/
#include "primitives.h"
#include "object.h"
#include "util.h"
#include "graphic_text.h"
/*--------------------------------------------------------------------------------*/
class GRAPHIC_TEXT_FPS : public GRAPHIC_TEXT
{

	// -- PUBLIC

public:

    DECLARE_REF( GRAPHIC_TEXT_FPS );

    // .. CONSTRUCTORS

    GRAPHIC_TEXT_FPS() : GRAPHIC_TEXT()
    {

    }

    virtual ~GRAPHIC_TEXT_FPS()
    {
     
    }

    // .. METHODS


    virtual VOID Update( const TIMER & time_step )
    {
    	REAL
			fps;

        fps = 1.0f / time_step.GetSecondCount();

        if( time_step.GetSecondCount() < 0.001f )
        {
        	fps = 999;
        }

        Text = TEXT::GetTextFromReal( fps );
        Text += " fps";

    	GRAPHIC_TEXT::Update( time_step );
    }



    // -- PRIVATE

private :

    // .. ATTRIBUTES

    
};
/*--------------------------------------------------------------------------------*/
#endif
